<div class="col-md-9 common-list" style="display:none">
	<div style="width:100%;height:90px;"></div>
	<div class="panel panel-default" style="margin-top:10px;">
		<div class="panel-heading">
		  <h4 class="panel-title">
			<a class="accordion-toggle data-parent="#accordion">公共版块</a>
			<i class="oa-post pull-right"></i>
		  </h4>
		</div>
		<div id="collapseOne" class="panel-collapse collapse in">
		  <div class="panel-body">

	<!-- Nav tabs -->
	<ul class="nav nav-tabs">
		<li class="active"><a href="#alltopic" id="0" data-toggle="tab">所有话题</a></li>
		<volist name="list" id="vo">
		<li><a href="#{$vo.target}" id="{$vo.category_id}" data-toggle="tab">{$vo.category_name}</a></li>
		</volist>
	</ul>

	<!-- Tab panes -->
	<div class="tab-content topic" style="padding-top:20px;">
		<div class="tab-pane fade in active" id="alltopic">
			<ul class="list-group">
				<volist name="topiclist" id="vo">
				<if condition="$vo.topic_categoryid eq 2">
				<else />
				<li class="list-group-item tooltips" data-placement="left" data-toggle="tooltip" data-original-title="【{$vo.category_name}】 回复/浏览:{$vo.comment}/{$vo.view}">
					<a href="" title="新窗口打开"><i class="folder_common pull-left"></i></a>
					<span class="pull-left">【{$vo.now_department_name}:{$vo.name}】</span>
					<a class="pull-left topic-title" id="{$vo.topic_id}" title="{$vo.topic_title}" content="{$vo.topic_content}">{$vo.topic_title}</a>
					<span class="pull-right">发表于:<i>{$vo.create_time}</i></span>
				</li>
				</if>
				</volist>
			</ul>
		</div>
		<volist name="list" id="vo">
		<div class="tab-pane fade" id="{$vo.target}">
			<assign name="category_id" value="$vo.category_id"/>
			<ul class="list-group">
			<volist name="topiclist" id="topic">
				<if condition="$topic.topic_categoryid eq $category_id">
					<if condition="$topic.topic_categoryid eq 2">
						<if condition="$topic.owner_uid eq $uid">
						<li class="list-group-item tooltips" data-placement="left" data-toggle="tooltip" data-original-title="【{$topic.category_name}】 回复/浏览:{$topic.comment}/{$topic.view}">
							<a href="" title="新窗口打开"><i class="folder_common pull-left"></i></a>
							<span class="pull-left">【{$topic.now_department_name}:{$topic.name}】</span>
							<a class="pull-left topic-title" id="{$topic.topic_id}" title="{$topic.topic_title}">{$topic.topic_title}</a>
							<span class="pull-right">发表于:<i>{$topic.create_time}</i></span>
						</li>
						<else />
						</if>
					<else />
					<li class="list-group-item tooltips" data-placement="left" data-toggle="tooltip" data-original-title="【{$topic.category_name}】 回复/浏览:{$topic.comment}/{$topic.view}">
						<a href="" title="新窗口打开"><i class="folder_common pull-left"></i></a>
						<span class="pull-left">【{$topic.now_department_name}:{$topic.name}】</span>
						<a class="pull-left topic-title" id="{$topic.topic_id}" title="{$topic.topic_title}">{$topic.topic_title}</a>
						<span class="pull-right">发表于:<i>{$topic.create_time}</i></span>
					</li>
					</if>
				<else />
				</if>
			</volist>
			</ul>
		</div>
		</volist>
	</div>

		  </div>
		</div>
	</div>
</div>
<script>
	$(function(){
		$(".tooltips").tooltip();
		$(".oa-post").click(function(){
			$("#topic").modal('show');
			$(".publish_topic").unbind('click').click(function(){
				html = editor4.html();
				var topic_title = getInputValueByName('topic_title'),
					category_id = $("select[name='category_id']").val();
				if(html == "" || topic_title == "" || category_id == "0"){
					$.globalMessenger().post("填入信息不能为空");
					return;
				}
				$.post('__APP__/Topic/postTopic',{topic_content:html,topic_title:topic_title,category_id:category_id},function(json){
					$.globalMessenger().post(json.info);
				});
			});
		});
		$(".topic .topic-title").click(function(){
			var topic_id = $(this).attr("id");
			var title = $(this).attr("title");
			topicDisplay(title,'__APP__/Topic/topic',topic_id);
		});
	});
</script>




